import openpyxl

excel_name = '02.xlsx'
wb = openpyxl.load_workbook(excel_name)
ws = wb.active

# 获取最后一列
max_column = ws.max_column + 1

# 遍历每一行
for i in range(1, ws.max_row + 1):
    # 在最后一列加入数据
    ws.cell(row=i, column=max_column).value = 0

# 保存
wb.save("05.xlsx")
